package jp.seraph.same.model;

import jp.seraph.jsade.model.Align;
import jp.seraph.jsade.model.JointIdentifier;
import jp.seraph.jsade.model.nao.NaoJointIdentifier;

public class NaoJointPositionMapper implements JointPositionMapper {

    public JointPositionEntry getPosition(JointIdentifier tIdentifier) {
        if (tIdentifier == NaoJointIdentifier.HJ1) {
            return new JointPositionEntry(Align.CENTER, 0);
        } else if (tIdentifier == NaoJointIdentifier.HJ2) {
            return new JointPositionEntry(Align.CENTER, 1);
        } else if (tIdentifier == NaoJointIdentifier.LAJ1) {
            return new JointPositionEntry(Align.LEFT, 0);
        } else if (tIdentifier == NaoJointIdentifier.LAJ2) {
            return new JointPositionEntry(Align.LEFT, 1);
        } else if (tIdentifier == NaoJointIdentifier.LAJ3) {
            return new JointPositionEntry(Align.LEFT, 2);
        } else if (tIdentifier == NaoJointIdentifier.LAJ4) {
            return new JointPositionEntry(Align.LEFT, 3);
        } else if (tIdentifier == NaoJointIdentifier.LLJ1) {
            return new JointPositionEntry(Align.LEFT, 4);
        } else if (tIdentifier == NaoJointIdentifier.LLJ2) {
            return new JointPositionEntry(Align.LEFT, 5);
        } else if (tIdentifier == NaoJointIdentifier.LLJ3) {
            return new JointPositionEntry(Align.LEFT, 6);
        } else if (tIdentifier == NaoJointIdentifier.LLJ4) {
            return new JointPositionEntry(Align.LEFT, 7);
        } else if (tIdentifier == NaoJointIdentifier.LLJ5) {
            return new JointPositionEntry(Align.LEFT, 8);
        } else if (tIdentifier == NaoJointIdentifier.LLJ6) {
            return new JointPositionEntry(Align.LEFT, 9);
        } else if (tIdentifier == NaoJointIdentifier.RAJ1) {
            return new JointPositionEntry(Align.RIGHT, 0);
        } else if (tIdentifier == NaoJointIdentifier.RAJ2) {
            return new JointPositionEntry(Align.RIGHT, 1);
        } else if (tIdentifier == NaoJointIdentifier.RAJ3) {
            return new JointPositionEntry(Align.RIGHT, 2);
        } else if (tIdentifier == NaoJointIdentifier.RAJ4) {
            return new JointPositionEntry(Align.RIGHT, 3);
        } else if (tIdentifier == NaoJointIdentifier.RLJ1) {
            return new JointPositionEntry(Align.RIGHT, 4);
        } else if (tIdentifier == NaoJointIdentifier.RLJ2) {
            return new JointPositionEntry(Align.RIGHT, 5);
        } else if (tIdentifier == NaoJointIdentifier.RLJ3) {
            return new JointPositionEntry(Align.RIGHT, 6);
        } else if (tIdentifier == NaoJointIdentifier.RLJ4) {
            return new JointPositionEntry(Align.RIGHT, 7);
        } else if (tIdentifier == NaoJointIdentifier.RLJ5) {
            return new JointPositionEntry(Align.RIGHT, 8);
        } else if (tIdentifier == NaoJointIdentifier.RLJ6) {
            return new JointPositionEntry(Align.RIGHT, 9);
        } else {
            throw new AssertionError("ありえないJointIdentifierか、プログラマのミスです");
        }
    }

}
